package org.haredot.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.TimeUnit;

@ConfigurationProperties(prefix = "jwt.config")
public class JwtProperties {
    /**
     * 令牌签发者
     */
    private String iss = "haredot";
    /**
     * 受众
     */
    private String aud = "haredot-client";

    /**
     * 时间单位，默认毫秒
     */
    private TimeUnit timeUnit = TimeUnit.MILLISECONDS ;
    /**
     * 方法令牌的过期时间，默认是毫秒
     */
    private long expiredTime ;

    /**
     * 刷新令牌，默认存活时间一天
     */
    private long refreshExpiredTime  ;
    /**
     * 私钥，只能让 服务器知道
     */
    private String key ;


    public String getIss() {
        return iss;
    }

    public void setIss(String iss) {
        this.iss = iss;
    }

    public String getAud() {
        return aud;
    }

    public void setAud(String aud) {
        this.aud = aud;
    }

    public long getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(long expiredTime) {
        this.expiredTime = expiredTime;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public long getRefreshExpiredTime() {
        return refreshExpiredTime;
    }

    public void setRefreshExpiredTime(long refreshExpiredTime) {
        this.refreshExpiredTime = refreshExpiredTime;
    }
}
